<extend name='layout:index'/>

<block name='content'>

    <div class="wrapper wrapper-content animated fadeInRight">
      <div class="row">
      <div class="tabs-container text-center">
		   <ul class="nav nav-tabs">
		       <li class=""><a data-toggle="tab" href="#tab-1" aria-expanded="false" id="a_one" onclick="f1()" style="width: 300px; background-color: white;"> 基本信息</a>
		       </li>
		       <li class=""><a data-toggle="tab" href="#tab-2" aria-expanded="false" id="a_two" onclick="f2()" style="width: 300px; background-color: white;">接点信息</a>
		       </li>
		        <li class="active"><a data-toggle="tab" href="#tab-3" aria-expanded="true" id="a_three" onclick="f3()" style="width: 300px; background-color: white;">银行信息</a>
		       </li>
		   </ul>
      <div class="tab-content">
       <div id="tab-1" class="tab-pane">
           <div class="panel-body">
           <div class="col-sm-12">
			  <div class="ibox float-e-margins">
			      <div class="ibox-content">
			          <form class="form-horizontal m-t" id="signupForm" action="__MODULE__/person/doperson" method="post" name="theForm" >
			              <div class="form-group">
			                 <label class="col-sm-3 control-label">用户名：</label>
                                <div class="col-sm-8">
                                    <input disabled="disabled" name="user_name" class="form-control" value="{$_SESSION['users']['user_name']}" readonly="readonly" type="text">
                                </div>
			              </div>
			              <div class="form-group">
			                  <label class="col-sm-3 control-label">会员ID：</label>
                                <div class="col-sm-8">
                                    <input disabled="disabled" name="user_id" class="form-control" value="{$_SESSION['users']['user_id']}" readonly="readonly">
                                </div>
			              </div>
			              <div class="form-group">
			                   <label class="col-sm-3 control-label">真实姓名：</label>
                                <div class="col-sm-8">
                                    <input disabled="disabled" name="true_name" class="form-control" value="{$_SESSION['users']['true_name']}" readonly="readonly">
                                </div>
			              </div>
			              <div class="form-group">
			                  <label class="col-sm-3 control-label">身份证号：</label>
                                <div class="col-sm-8">
                                    <input disabled="disabled" name="cardno" class="form-control" value="{$_SESSION['users']['cardno']}" readonly="readonly">
                                </div>
			              </div>
			              <div class="form-group">
			                  <label class="col-sm-3 control-label">联系电话：</label>
                                <div class="col-sm-8">
                                    <input disabled="disabled" name="mobile_phone" class="form-control" value="{$_SESSION['users']['mobile_phone']}" readonly="readonly">
                                </div>
			              </div>
			               <div class="form-group">
			                   <label class="col-sm-3 control-label">注册时间：</label>
                                <div class="col-sm-8">
                                    <input disabled="disabled" name="reg_time" class="form-control" value=" <?php echo date('Y-m-d H:i:s',$_SESSION['users']['reg_time']) ?>" readonly="readonly">
                                </div>
			               </div>
			           </form>
			       </div>
			   </div>
			</div>
            </div>
        </div>
        <div id="tab-2" class="tab-pane">
            <div class="panel-body">
            <div class="col-sm-12">
			  <div class="ibox float-e-margins">
			    <div class="ibox-content">
            	<form class="form-horizontal m-t" name="aqmmform" action="__MODULE__/person/doperson" method="post" onsubmit="return aqmmchange();">
	              <div class="form-group">
	                  <label class="col-sm-3 control-label">会员等级：</label>
                         <div class="col-sm-8">
                            <input disabled="disabled" name="user_name" class="form-control" value="{$vip}" readonly="readonly" type="text">
                          </div>
	              </div>
	              <div class="form-group">
	                  <label class="col-sm-3 control-label">推荐人账号：</label>
	                  <div class="col-sm-8">
	                      <input id="" name="" class="form-control" value="{$inviterName}" readonly="" type="text">
	                  </div>
	              </div>
	              <div class="form-group">
	                  <label class="col-sm-3 control-label">推荐人id：</label>
	                  <div class="col-sm-8">
	                      <input id="repassword2" name="repassword2" class="form-control" value="{$_SESSION['users']['inviter_id']}" readonly="" type="text">
	                  </div>
	              </div>
	               <div class="form-group">
	                   <label class="col-sm-3 control-label">接点人账号：</label>
	                  <div class="col-sm-8">
	                      <input id="repassword2" name="repassword2" class="form-control" value="{$treeName}" readonly="" type="text">
	                  </div>
	               </div>
	               <div class="form-group">
	                   <label class="col-sm-3 control-label">接点人id：</label>
	                  <div class="col-sm-8">
	                      <input id="repassword2" name="repassword2" class="form-control" value="{$_SESSION['users']['tree_id']}" readonly="" type="text">
	                  </div>
	               </div>
	           </form>
	           </div>
	           </div>
	           </div>
            </div>
        </div>
        <div id="tab-3" class="tab-pane active">
            <div class="panel-body">
            <div class="col-sm-12">
			  <div class="ibox float-e-margins">
			    <div class="ibox-content">
            	<form class="form-horizontal m-t" name="aqmmform" action="__MODULE__/person/doperson" method="post" onSubmit="return checkSubmit(this)">
	              <div class="form-group">
	                  <label class="col-sm-3 control-label">银行名称：</label>
                          <div class="col-sm-8">
                          	<select name="mainbank"><option value="中国农业银行">中国农业银行</option><option value="中国建设银行">中国建设银行</option><option value="中国工商银行">中国工商银行</option><option value="中国邮政储蓄银行">中国邮政储蓄银行</option><option value="中国银行">中国银行</option><option value="交通银行，招商银行，浦发银行，民生银行，光大银行，平安银行">交通银行，招商银行，浦发银行，民生银行，光大银行，平安银行</option></select>                          </div>
	              </div>
	              <div class="form-group">
	                  <label class="col-sm-3 control-label">银行卡号</label>
	                  <div class="col-sm-8">
                          <input id="bank_code" name="bank_code" class="form-control" value="1"  type="text">

                      </div> <span id='empty_bank_code' style='color:red'></span>
	              </div>
	              <div class="form-group">
	                  <label class="col-sm-3 control-label">开户行地址</label>
                                <div class="col-sm-8">
                                    <input id="bank_name" name="bank_name" class="form-control" value="{$_SESSION['users']['bank_name']}" type="text">
                                    
                                </div>
                                <span id='empty_bank_name' style='color:red'></span>
	              </div>
	               <div class="form-group">
	                   <label class="col-sm-3 control-label">支付宝</label>
                                <div class="col-sm-8">
                                    <input id="zhifubao" name="zhifubao" class="form-control" value="{$_SESSION['users']['zhifubao']}" type="text">
                                </div>
	               </div>
	               <div class="form-group">
	                   <label class="col-sm-3 control-label">微信号</label>
                         <div class="col-sm-8">
                             <input id="weixin" name="weixin" class="form-control" value="{$_SESSION['users']['weixin']}" type="text">
                         </div>
	               </div>
	               <div class="form-group">
			                  <label class="col-sm-3 control-label">手机号</label>
                                <div class="col-sm-8">
                                    <input disabled="disabled" name="mobile_phone" class="form-control" value="{$_SESSION['users']['mobile_phone']}" readonly="readonly">
                                </div>
			        </div>
			        <div class="form-group">
			                  <label class="col-sm-3 control-label">安全密码</label>
                                <div class="col-sm-8">
                                    <input name="repassword" class="form-control" type="password" id='repassword'>
                                </div>
                                <span></span>
			        </div>
			        <div class="form-group">
                        <div class="col-sm-8 col-sm-offset-3">
                            <button class="btn btn-primary" type="submit">提交修改</button>
                        </div>
                    </div>
	           </form>
	           </div>
	           </div>
	           </div>
            </div>
        </div>
   </div>
   </div>
</div>
    </div>
    <script src="___PUBLIC__/home/js/jquery.min.js?v=2.1.4"></script>
    <script src="___PUBLIC__/home/js/bootstrap.min.js?v=3.3.5"></script>
    <script src="___PUBLIC__/home/content.min.js?v=1.0.0"></script>
    <script src="___PUBLIC__/home/js/plugins/layer/layer.min.js"></script>
    <script>
   
		 

		    function checkSubmit()
		    {
		    	var k = false;
		        if($('#bank_code').val() == ''){
		            $('#empty_bank_code').html('卡号未填');
		            return false;
		        }else{
		        	 $('#empty_bank_code').html('');
		        }
		        
		        if($('#bank_name').val() == ''){
		            $('#empty_bank_name').html('开户地未填');
		            return false;
		        }else{
		        	 $('#empty_bank_name').html('');
		        }                
		         $.ajaxSetup({
		             headers: {
		                'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
		             }
		        });
		                
		        $.ajax({
		            type : 'POST',
		            url : '/home/person/dopersonAjax',
		            data : {repassword:$('#repassword').val()},
		            dataType : 'html',
		            async : false,
		            success : function(str){
		                if(str==2){
		                     var txt=  "您 的 安 全 密 码 有 误";
					              window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.info);
		                    return false;
		                }
		                if(str==1){
		                	k = true;
		                }          
		               

		       	 	}
		        
		   	 	})
		   	 	return k;
			}

	
	
</script>
    



</block>